package router

import (
	"github.com/gin-gonic/gin"
	v1 "perfect-vue-admin/api/v1"
	"perfect-vue-admin/middleware"
)

func InitFileRouter(Router *gin.RouterGroup)  {
	FileRouter := Router.Group("file").Use(middleware.JWTAuth()).
		Use(middleware.CasbinHandler()).
		Use(middleware.OperationRecord())
	{
		FileRouter.POST("/uploadImage", v1.UploadImage)
		FileRouter.POST("/uploadExcel", v1.UploadExcel)
		FileRouter.POST("/uploadFile", v1.UploadFile)
		FileRouter.POST("/downloadFile", v1.FileDownload)
		FileRouter.DELETE("/deleteFile", v1.DeleteFile)
		FileRouter.PUT("updateFileName", v1.UpdateFileName)
		FileRouter.GET("/getFileList", v1.GetFileList)
	}
}
